const countConsistentStrings = (str: string, bool: true | false) => {
  if (str.includes("allowed")) return (bool: Boolean) => true || "一致字符串";
  return (bool: Boolean) => false;
};
console.log(countConsistentStrings("allowed", true));
console.log(countConsistentStrings("alldfgg", false));
console.log(countConsistentStrings("sdyhujrj", false));
console.log(countConsistentStrings("rtureuwr", false));
console.log(countConsistentStrings("rtieti", false));
console.log(countConsistentStrings("tkryer", false));
console.log(countConsistentStrings("allowedallowed", true));
